package com.itheima.reggie.service;

import com.itheima.reggie.entity.ShoppingCart;

import java.util.List;

/**
 * @Author: dw
 * @Date 2022/3/16 23:47
 */
public interface ShoppingCartService {

    /**
     * 根据用户id查询购物车内所有物品
     * @param
     * @return
     */
    List<ShoppingCart> findAll();

    /**
     * 增加菜品或套餐到购物车
     * @param shoppingCart
     * @return
     */
    ShoppingCart save(ShoppingCart shoppingCart);

    /**
     * 根据用户id清空购物车
     * @return
     */
    boolean deleteByUserId();

    /**
     * 减少购物车菜品或套餐
     * @param shoppingCart
     * @return
     */
    boolean reduce(ShoppingCart shoppingCart);
}
